import httpUtil from '../utils/request'

export function nsPage(ns,page,limit){
    const params = {
        ns,
        page,
        limit,
    }
    return httpUtil({
        url: '/ns/page',
        method: 'get',
        params: params
    })
}

export function nsInfo(ns){
    return httpUtil({
        url: '/ns/info/' + ns,
        method: 'get'
    })
}

export function nsList(ns){
    const params = {
        ns
    }
    return httpUtil({
        url: '/ns/list',
        method: 'get',
        params: params
    })
}

export function nsDel(nss){
    const data = {
        nss
    }
    return httpUtil({
        url: '/ns/del',
        method: 'post',
        data: data
    })
}

export function nsAdd(ns,name,description){
    const data = {
        ns,
        name,
        description
      }
    return httpUtil({
        url: '/ns/add',
        method: 'post',
        data: data
    })
}

export function nsUpdate(ns,name,description){
    const data = {
        ns,
        name,
        description
      }
    return httpUtil({
        url: '/ns/update',
        method: 'post',
        data: data
    })
}